package me.zhengjie.minbearwcs.entity.DTO.wms.materialType;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import me.zhengjie.minbearwcs.entity.DTO.wms.login.MinBearLoginResultDTOContext;
import org.openxmlformats.schemas.officeDocument.x2006.sharedTypes.STTrueFalse;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class MinBearMaterialTypeDTO {
    @JsonProperty("ApiType")
    private String ApiType = "MaterialController";

    @JsonProperty("Parameters")
    private List<Map<String, Map<String, String>>> Parameters = new ArrayList<>();

    @JsonProperty("Method")
    private String Method = "GetMaterialInfo";

    @JsonProperty("Context")
    private MinBearLoginResultDTOContext Context = new MinBearLoginResultDTOContext();

    public MinBearMaterialTypeDTO(String dateGet, String ticket) {
        HashMap<String, String> map1 = new HashMap<>();
        map1.put("UpdateDate", dateGet);
        HashMap<String, Map<String, String>> map2 = new HashMap<>();
        map2.put("Value", map1);
        Parameters.add(map2);
        Context.setTicket(ticket);
        Context.setInvOrgId(1);
    }


}
